﻿@model IEnumerable<HdipCricketClub.Models.Result>

@{
    ViewBag.Title = "View Summaries";
}

<h2>View Summaries</h2>

<table>
    <tr>
        <th>
            Date:
        </th>
        <th>
            Team:
        </th>
        <th>
            Opponent:
        </th>
        <th>
            Batted First
        </th>
        <th>
            First Innings
        </th>
        <th>
            Second Innings
        </th>
        <th>
            Result
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
             @Html.DisplayFor(modelItem => item.Fixture.date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Fixture.Team.name) 
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Fixture.Opponent.club_name) 
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Fixture.ScorecardHeader.batted_first)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.first_innings_runs) for @Html.DisplayFor(modelItem => item.first_innings_wickets) wkts
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.second_innings_runs) for @Html.DisplayFor(modelItem => item.second_innings_wickets) wkts
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ResultDescription)
        </td>
        <td>
            @Html.ActionLink("Return to Home Page", "Index","Home")
        </td>
    </tr>
}

</table>
